package STUDENT.TRANNGUYENQUAN.OOPs.OBJECT_AND_CLASSES.Stock;

public class Models {
	public String changePercent(Stock sto){
		String result = "";
		double chance = 0;
		if(sto.getCurrentPrice()>=sto.getPreviousClosingPrice()){
			chance = (sto.getCurrentPrice()-sto.getPreviousClosingPrice())/sto.getPreviousClosingPrice();
			return result = "+"+chance;
		}else{
			chance = (sto.getPreviousClosingPrice()-sto.getCurrentPrice())/sto.getPreviousClosingPrice();
			return result = "-"+chance;
		}
	}
}
